<div class="hero-unit" style="padding:20px 20px 0 20px ">
  <%= form_for(@student) do |f| %>
      <% if @student.errors.any? %>
          <div id="error_explanation">
            <h2>在保存时发生<%= @student.errors.count %>个错误:</h2>
            <ul>
              <% @student.errors.full_messages.each do |msg| %>
                  <li><%= msg %></li>
              <% end %>
            </ul>
          </div>
      <% end %>

      <div class="clearfix">
        <%= f.label :studentId %>
        <div class="input">
          <%= f.text_field :studentId %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :fid %>
        <div class="input">
          <%= f.text_field :fid %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :grade %>
        <div class="input">
          <%= f.text_field :grade %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :university %>
        <div class="input">
          <%= f.text_field :university %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :college %>
        <div class="input">
          <%= f.text_field :college %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :major %>
        <div class="input">
          <%= f.text_field :major %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :sgroup %>
        <div class="input">
          <%= f.select(:sgroup, YAML.load(Mconfig.find_by_cname("groups").cvalue)) %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :name %>
        <div class="input">
          <%= f.text_field :name %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :gender %>
        <div class="input">
          <%= f.select(:gender, [["男", 0], ["女", 1]]) %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :nationality %>
        <div class="input">
          <%= f.text_field :nationality %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :birth %>
        <div class="input">
          <%= f.date_select :birth, {:start_year =>1900, :end_year=>Time.now.year-5}, :class=>"mini" %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :politics %>
        <div class="input">
          <%= f.text_field :politics %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :height %>
        <div class="input">
          <%= f.number_field :height %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :weight %>
        <div class="input">
          <%= f.number_field :weight %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :personalId %>
        <div class="input">
          <%= f.text_field :personalId %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :studentAddr %>
        <div class="input">
          <%= f.text_field :studentAddr %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :graduationTime %>
        <div class="input">
          <%= f.date_select :graduationTime, {:order=>[:year, :month]}, :class=>"mini" %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :certificate %>
        <div class="input">
          <%= f.text_area :certificate, :class=>"large", :rows=>"3" %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :phone %>
        <div class="input">
          <%= f.text_field :phone %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :specialty %>
        <div class="input">
          <%= f.text_field :specialty %>
        </div>
      </div>
      <div class="clearfix">
        <%= f.label :sextenstion %>
        <div class="input">
          <%= f.text_area :sextenstion, :class=>"large", :rows=>"3" %>
        </div>
      </div>
      <div class="actions">
        <%= f.submit :class=>"btn primary" %>
        <button type="reset" class="btn">取消</button>
      </div>
  <% end %>
</div>